package com.lzq.leetcode.lanqiao;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

public class s1019 {

    private static final int[][] initBlack = new int[][]{{0, 0}, {2020, 11}, {11, 14}, {2000, 2000}};
    public static void main(String[] args) {
        int sum = 0;
        for (int i=-2021; i<=4041; i++) {
            for (int j=-2021; j<=4021; j++) {
                for (int n=0; n<4; n++) {
                    int initX = initBlack[n][0];
                    int initY = initBlack[n][1];
                    if ( ( Math.abs(i-initX) + Math.abs(j-initY) ) <= 2020 ) {
                        ++sum;
                        break;
                    }
                }
            }
        }
        System.out.println(sum);
    }


}
